﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Xml;

namespace PwjCy.Lite.Storage
{
    /// <summary>
    /// Sql语句执行接口
    /// </summary>
    public interface IStatement
    {
        // Methods
        IStatement Clone(IConnection conn, string originalTableName, string newTableName, bool replaceAllTableName);

        DataSet ExecuteDataSet();
        void ExecuteDataSet(DataSet ds);
        int ExecuteNonQuery();
        IResultReader ExecuteReader();
        IDataReader ExecuteReader(CommandBehavior cb);
        IDataReader ExecuteReaderDirectly();
        object ExecuteScalar();
        XmlReader ExecuteXmlReader();
        string GetPasswordEscapedConnectionString();

        // Properties
        string CommandText { get; }
        int CommandTimeout { get; set; }
        IDbTransaction Transaction { get; set; }
    }
}
